LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-24-2021, 03:08 PM   #1
steelwing
LQ Newbie
 
Registered: May 2017
Posts: 18

Rep: Reputation: Disabled
[USB] USB devices getting blocked on reboot


So I implemented USB blocking and whitelisting in an environment following this guide. Now, when we reboot any machine that has these rules in place, all USB devices immediately get blocked. All of them, even the ones I've explicitly allowed by idVendor and idProduct. The USB root hubs (usb1 and usb2) both get authorized successfully, but nothing else does, even though the rules. So what gives? I've tried enabling debug logging in udev using
Code:
udevadm control --log-priority=debug
, but even that didn't seem to reveal anything. Under usb1 in the /sys tree, there appears to be a device 2-0:1.0 that's been deauthorized, but I'm not sure if that matters or not.
 
Old 02-24-2021, 07:56 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,005

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
Most of time I'd think some small edit is wrong or some sequence of what is OK versus what is not at boot.

Might look at usbguard also.
 
1 members found this post helpful.
Old 02-25-2021, 05:07 AM   #3
steelwing
LQ Newbie
 
Registered: May 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Most of time I'd think some small edit is wrong or some sequence of what is OK versus what is not at boot.

Might look at usbguard also.
usbguard is on those machines, but this last time I deliberately disabled it and rebooted the machine I was testing on. When the USB stuff was still missing after that, I removed usbguard entirely and rebooted again. Still the same behavior.

So it's definitely the rules and something about the way they're allowing/not allowing things during boot time. Any suggestions for how to trace this would be welcome.
 
Old 02-25-2021, 05:24 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,142

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
I agree with jefro - especially after your experiences in the previous thread.
I don't like the theory of that link for gross disabling. The whole idea of dropping through to a disable unless matched prior is just waiting for this scenario. I might be inclined to test a match and add a separate alias - that way you know what has "hit". If the alias(s) aren't there later, you know your tests (or logic) are wrong.
 
Old 02-25-2021, 06:09 AM   #5
steelwing
LQ Newbie
 
Registered: May 2017
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I agree with jefro - especially after your experiences in the previous thread.
I don't like the theory of that link for gross disabling. The whole idea of dropping through to a disable unless matched prior is just waiting for this scenario. I might be inclined to test a match and add a separate alias - that way you know what has "hit". If the alias(s) aren't there later, you know your tests (or logic) are wrong.
In this case, though, the gross disabling is exactly the behavior my bosses want. That's why usbguard was the first thing they tried, because it blocks everything not explicitly allowed. The only reason we're implementing our own version of usbguard via udev (instead of using usbguard itself) is because we need some of the devices we're allowing to get handled in a certain special way.
Maybe I can have the disable part create some sort of log. Like a RUN+= at the end that tells it to echo out the idProduct and idVendor (or other identifying attributes) to a text file for each thing that got disabled.
 
Old 03-19-2021, 06:36 AM   #6
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Rep: Reputation: 5
Posted in the wrong thread

Last edited by ccj4467; 03-19-2021 at 06:38 AM.
 
  


Reply

Tags
rhel7, udev, udev rules, usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] USB devices are "Unknown Devices" under Windows 7 Home x64 KVM KARNVORbeefRAGE Linux - Virtualization and Cloud 5 10-08-2016 06:02 PM
Mod recent blocked related question (netfilter). WHO IS BLOCKED CarLost Linux - Security 6 07-29-2008 03:53 PM
My E-mail address is getting blocked General General 2 01-21-2007 05:00 PM
getting by blocked ports niehls Linux - Networking 1 07-06-2003 03:00 PM
think I'm getting blocked at the switch jdh Linux - Networking 19 12-19-2001 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration